# This is a system status script
# Shows: 

# kernel and uptime
#-------------------
# Processor info
#-------------------
# Graphics card info
#-------------------
# Memory information
#-------------------
# Top 8 processes
#-------------------
# SSD Information
#-------------------
# HDD Information
#-------------------
conky.config = {
  alignment = 'bottom_right',
  background = true,
  border_width = 0.5,
  cpu_avg_samples = 4,
  default_color = 'white',
  default_outline_color = 'grey',
  default_shade_color = 'black',
  draw_borders = true,
  draw_graph_borders = true,
  draw_outline = false,
  draw_shades = false,
  use_xft = true,
  font = 'Ubuntu-Mono:size=10',
  gap_x = 30,
  gap_y = 50,
  maximum_width = 370,
  minimum_height = 5,
  minimum_width = 370,
  net_avg_samples = 2,
  double_buffer = true,
  out_to_console = false,
  out_to_stderr = false,
  extra_newline = false,
  own_window = true,
  own_window_colour = '000000',
  own_window_class = 'Conky',
  own_window_argb_visual = false,
  own_window_type = 'desktop',
  own_window_transparent = true,
  own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
  stippled_borders = 0,
  update_interval = 1,
  uppercase = false,
  use_spacer = 'none',
  show_graph_scale = false,
  show_graph_range = false
}

conky.text = [[
  # JODAROVE
  ${alignr}${font Ubuntu :Bold:size=26}${color #00ff9c} AZ
  # SYS
  ${alignr}${font Ubuntu :Bold:size=18}${color #00ff9c}SYSTEM
  ${hr 1}$color${font Ubuntu :size=14}${offset 1}
    Kernel $alignr $kernel
    Uptime $alignr $uptime

  # Processor
  ${alignr}${font Ubuntu :Bold:size=18}${color #00ff9c}AMD RYZEN 3700X
  ${hr 1}$color${font Ubuntu :size=14}${offset 1}
    $color${font Ubuntu :size=14}Usage $alignr $cpu %
    Temperature $alignr ${exec sensors | grep 'Tctl' | awk '{print $2}'}

  # NVidia GeForce® GTX 1050-Ti 6GB
  ${alignr}${font Ubuntu :Bold:size=18}${color #00ff9c}GTX-1050-Ti 4GB
  ${hr 1}$color${font Ubuntu :size=14}${offset 1}
    Frequency $alignr ${nvidia gpufreq} Mhz
    Memory $alignr ${nvidia memfreq} Mhz
    Temperature $alignr ${nvidia temp}°C

  # RAM
  ${alignr}${font Ubuntu :Bold:size=18}${color #00ff9c}RAM
  ${hr 1}$color${font Ubuntu :size=14}${offset 1}
    Total $alignr $memmax
    In use $alignr $mem
    Free $alignr $memeasyfree
    Buffers $alignr $buffers
    Cache $alignr $cached

  # PROCESSES
  ${alignr}${font Ubuntu :Bold:size=18}${color #00ff9c}PROCESSES
  ${hr 1}$color${font Ubuntu :size=14}${offset 0}
  #$color${font Ubuntu :size=16}CPU$font
  ${offset 0}${font Noto sans:size=15:bold}${color #00ff9c}Name               ${alignr}PID   CPU%   MEM%
  ${offset 0}${font Noto sans:size=16}${offset 15}${color #ff6688}${top name 1} ${alignr}${top pid 1} ${top cpu 1} ${top mem 1}${offset 0}${font Noto sans:size=15}
  ${offset 15}${color #ff5588}${top name 2} ${alignr}${top pid 2} ${top cpu 2} ${top mem 2}${offset 0}${font Noto sans:size=14}
  ${offset 15}${color #ff3378}${top name 3} ${alignr}${top pid 3} ${top cpu 3} ${top mem 3}${offset 0}${font Noto sans:size=13}
  ${offset 15}${color #ff0078}${top name 4} ${alignr}${top pid 4} ${top cpu 4} ${top mem 4}${offset 0}${font Noto sans:size=12}
  ${offset 15}${color #ff0078}${top name 5} ${alignr}${top pid 5} ${top cpu 5} ${top mem 5}
  ${offset 15}${color #ff0078}${top name 6} ${alignr}${top pid 6} ${top cpu 6} ${top mem 6}
  ${offset 15}${color #ff0078}${top name 7} ${alignr}${top pid 7} ${top cpu 7} ${top mem 7}
  ${offset 15}${color #ff0078}${top name 8} ${alignr}${top pid 8} ${top cpu 8} ${top mem 8}

  # SSD 
  ${alignr}${font Ubuntu :Bold:size=18}${color #00ff9c}SSD
  $color${font Ubuntu :size=14}${offset 1}${color #00ff9c}${fs_bar 2 /home/}  ${color #ffffff} 
   ${offset 0}${font Noto sans:size=15:bold}${color #00ff9c}Total           ${alignc} Free             ${alignr}   Used $color${font Ubuntu :size=14}${offset 1}${color #ffffff} 
   ${fs_size /home/}           ${fs_free /home/} ${alignr} ${fs_used /home/}

  # HDD 
  ${alignr}${font Ubuntu :Bold:size=18}${color #00ff9c}HDD
  $color${font Ubuntu :size=14}${offset 1}${color #00ff9c}${fs_bar 2 /mnt/mass_storage/}  
   ${offset 0}${font Ubuntu:size=15:bold}${color #00ff9c}Total              ${alignc} Free             ${alignr}   Used $color${font Ubuntu :size=14}${offset 1}${color #ffffff} 
   ${fs_size /mnt/mass_storage/}           ${fs_free /mnt/mass_storage/} ${alignr} ${fs_used /mnt/mass_storage/}

]]
